PCT algorithm